package com.financial.service.heemoney.convertor;

import com.financial.service.heemoney.dto.HeemoneyConfigDTO;
import com.financial.service.heemoney.dto.businsess.HeemoneyPayBusinessDTO;
import com.financial.service.heemoney.dto.businsess.HeemoneyRegisterBusinessDTO;
import com.financial.service.heemoney.dto.commmon.HeemoneyRegisterCommonDTO;
import com.financial.service.heemoney.dto.inparameter.HeemoneyPayInParamDTO;
import com.financial.service.heemoney.dto.inparameter.HeemoneyRegisterInParamDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * @Author: zhaopengjun
 * @Email dashuaizhao@aliyun.com
 * @Date: 2019/12/5 10:28
 * @Des 汇收银报备相关接口
 */
@Mapper
public interface HeemoneyRegisterConvert {

    HeemoneyRegisterConvert MAPPER = Mappers.getMapper(HeemoneyRegisterConvert.class);
    @Mapping(target = "method", source = "heemoneyConfigDTO.heemoneyRegister.method")
    @Mapping(target = "isv_mch_uid",source ="heemoneyConfigDTO.heemoneyAccountType.isv_mch_uid")
    @Mapping(target = "isv_app_id",source ="heemoneyConfigDTO.heemoneyAccountType.app_id")
    @Mapping(target = "key",source ="heemoneyConfigDTO.heemoneyAccountType.key")
    HeemoneyRegisterCommonDTO configDTOConvertCommonDTO(HeemoneyConfigDTO heemoneyConfigDTO, HeemoneyRegisterInParamDTO heemoneyRegisterInParamDTO);

    HeemoneyRegisterBusinessDTO configDTOConvertBusinessDTO(HeemoneyConfigDTO heemoneyConfigDTO, HeemoneyRegisterInParamDTO heemoneyRegisterInParamDTO);
}
